package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @Classname UserMapper
 * @Description
 * @Date 2024/2/17 15:59
 * @Created by wangxiaojie
 */
@Mapper
public interface UserMapper {

    /**
     * 通过openid查询用户信息
     * @param openid
     * @return
     */
    @Select("select * from user where openid =#{openid}")
    User getUserByopenid(String openid);

    /**
     * 添加数据
     *
     * @param user
     */

    void insert(User user);

}
